<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1">
  <title>合易付充值</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <link rel="icon" href="favicon.ico" />

  <script src="../public/all/js/jquery-3.1.1.min.js"></script>
  <script src="../public/all/js/amazeui.min.js"></script>
  <script src="../public/all/js/jquery.cookie.js"></script>
  <script src="js/login.min.js"></script>

  <!-- debug only -->
  <script src="../public/all/js/jquery.nivo.slider.js"></script>
  <script src="../public/all/layer/layer.js"></script>

  <script src="../public/all/js/context.js"></script>
  <script src="../public/all/js/util.js"></script>
  <script src="../public/all/js/cmd.js"></script>
  <script src="js/app.js"></script>
  <script src="../public/all/js/classify.js"></script>
  <script src="../public/all/js/page.js"></script>
  <script src="../public/all/js/rule/rule.js"></script>

  <script src="../public/all/js/me.js"></script>
  <!-- debug only end -->
</head>
<body>
    数据提交中，请稍后……
    <div id="heyifuu" style="display:none;">
        <form id="form-hidden" action="http://pay.heyifuu.cn/cgi-bin/netpayment/pay_gate.cgi" method="post">
            <div></div>
            <input type="submit" value="提交"/>
        </form>
    </div>
    
    <script type="text/javascript">
        var key = urlInfo.params.key, amount = urlInfo.params.amount, payType = urlInfo.params.payType || '';
        var channel3 = '';
        if (payType == '1') channel3 = 'bank';
        else if (payType == '4') channel3 = 'alipay';
        else if (payType == '5') channel3 = 'wechat';
        else if (payType == '6') channel3 = 'qq';

        CMD.pay_heyifuu_create(key, amount * 100, "goods", channel3, function(r) {
            var heyifuu = r;
            heyifuu.signMsg = heyifuu.signMsg.toLowerCase();
            heyifuu.bankCode = 'Mobaopay';
            heyifuu.choosePayType = payType;
            for (var k in heyifuu) {
                var l = '__k__<input type="text" name="__k__" value="__v__"><br>';
                l = l.replace(/__k__/g, k);
                l = l.replace(/__v__/g, heyifuu[k]);
                $("#form-hidden div").append(l);	
            }
            $("#form-hidden").submit();
        });
    </script>
</body>
</html>
